import React from 'react'
import {Carousel} from "antd-mobile"
import "./Banner.less"
// 新人专享
// 3.轮播数据的操作
function Banner(props) {
    // 3.1取数据
    let { getnewList } = props
    return (
        <div className="con">
            {/* 3.2设置ui样式 */}
            <Carousel
                 className="space-carousel"
                 frameOverflow="visible"
                 cellSpacing={10}
                 slideWidth={0.8}
                 autoplay={true}
                 infinite={true}
            >
            {/* 3.3遍历数据 */}
            {
                getnewList.map((item)=>(
                    <img key={item.id} src={item.img} alt="" />
                )
                    )
            }</Carousel>
        </div>
    )
}
export default React.memo(Banner)

